<template>
  <router-view />
</template>

<script setup lang="ts">
//https://vite-pwa-org.netlify.app/guide/auto-update
//In order to reload all client tab/window, you will need to import any virtual module provided by the plugin:
//if you're not using any virtual, there is no way to interact with the application ui,
//and so, any client tab/window will not be reloaded (the old service worker will be still controlling the application).
//
//https://vite-pwa-org.netlify.app/frameworks/vue
import {useRegisterSW} from "virtual:pwa-register/vue";

const intervalMS = 60 * 60 * 1000

useRegisterSW({
	onRegistered(r){
		r && setInterval(()=>{
			r.update()
		},intervalMS)
	}
})
</script>

<style scoped></style>
